<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateAssortsTables extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('assorts', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('goods_id');    //服装唯一标识
            $table->string('serial');   //款号
            $table->string('category');     //类型
            $table->string('size');     //尺码
            $table->string('color');    //颜色;
            $table->string('state')->default(1);    //颜色;售出、损毁、返仓。
            $table->string('price')->default(0);    //市场销售价格
            $table->string('discount')->default(0); //折扣价格。
            $table->integer('number');      //商品数量
            $table->string('orderno')->unqiue(); //对应归属与盒子的订单号
            $table->string('img')->nulable(); //对应的照片
            $table->string('keeper')->default(0); //仓管清点人员
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('assorts');
    }
}
